<template>
	<view class="root">
		<view class="cu-modal show">
			<view class="cu-dialog">
				<view class="cu-bar bg-white justify-end">
					<view class="content">插入图片</view>
					<view class="action" @tap="ChooseImage(false)">
						<text class="cuIcon-close text-red"></text>
					</view>
				</view>
				<view class="padding-xl">
					上传方式
				</view>
				<view class="cu-bar bg-white">
					<view class="action margin-0 flex-sub text-blue solid-left" @tap="ChooseImage(true,0)">拍照</view>
					<view class="action margin-0 flex-sub text-blue solid-left" @tap="ChooseImage(true,1)">相册</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			ChooseImage(flag, index) {
				this.$emit('ChooseImage', {
					flag,
					index
				})
			}
		}
	}
</script>

<style>
	page {
		height: auto;
		min-height: 100%;
	}
</style>
